



<?php if($category){?>
<!-- FILTER -->
<div class="panel-group" id="accordion">
	<div class="panel  m-bot-25">
		<div class="panel-heading  bg-yellow">
			<div class="panel-title">
				<h2>
					<a class="accordion-toggle" data-toggle="collapse"
						data-parent="#accordion" href="#collapseOne"> Filter Search <b
						class="caret"></b>
					</a>
				</h2>
			</div>
		</div>
		<div id="collapseOne" class="panel-collapse collapse in">

			<?php if($category){?>
			<div class="panel-body pin">
				<div class="col3">
					<div class="list">
						<?php foreach ($category as $category): ?>
						<h4>
							<a
								href="<?=base_url();?><?= seoUrl(location());?>/<?= $category->slug; ?>"
								title="<?= $category->name; ?> in <?= $locData['name'] ?>"><?= $category->name; ?>
							</a>
						</h4>
						<?php endforeach;?>
					</div>
				</div>
			</div>
			<?php }?>
		</div>
	</div>
</div>
<!-- END FILTER -->
<?php } ?>
<style>
#map_canvas{height:250px !important; }
</style>

		<div class="panel">
		<div class="panel-heading-primary clearfix bg-yellow">
			

			<h4 class="font18">
				<strong><i class="fa fa-lg fa-exclamation-triangle "></i>
                Searching for
		businesses with <?=  ucwords($catData['name']); ?> in <?= ucwords($locData['name']); ?>.</strong>
			</h4>
		</div>


		<!-- MAP -->
		<div id="map-canvas">
			<?php echo $map['html']; ?>
			<?php echo $map['js']; ?>
		</div>
		<!-- END MAP -->

	</div>



<?php if($post){?>

<div class="listing">

	<?php foreach ($post as $post):?>

	<?php 
   $c = $this->term_model->getTermValue($post->id,'city',1);
	
	if($c){
	
	$loc = getPK('location',$c);
	
	
	
	//var_dump($loc);die();
	//die("YES");
	$loc = seoUrl($loc['name']);
	}else{
		
		$loc =  config_item('country');
		
		$loc = seoUrl($loc);
	}


	$cat = getPK('category',$this->term_model->getTermValue($post->id,'keyword',1));
	$cat = seoUrl($cat['name']);
	$photo = $this->gallery_model->getGallery($post->id,'photo',1);
	$video = $this->gallery_model->getGallery($post->id,'video',1);
	?>
	<div class="panel">
		<div class="panel-head clearfix">
			<div class="col-xs-1">
				<i class="fa fa-map-marker fa-3x "></i>
			</div>
			<div class="col-xs-9">

				<h2>
					<a
						href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>"><strong
						class="text-danger"><?= $post->title; ?> </strong> </a>
				</h2>
				<h3>
					<?= $this->category_model->getCategoryHTML($post->id); ?>

				</h3>
			</div>
			<div class="col-xs-2 text-right">
				<a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>"><i class="fa fa-2x fa-sign-out text-emboss"></i> </a>
			</div>
		</div>



		<div class="panel-body clearfix">
			<div class="col-xs-6 col-md-3">
				<a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>"> <img class="thumbnail img-responsive"
					src="<?= base_url();?>assets/img/data/logo/<?= $post->logo;?>"
					alt="<?= $post->title; ?>">
				</a>
			</div>
			<div class="col-lg-8">
				<p id="address">
					<?= $post->address1;?>
					<strong><?= $this->location_model->getLocationHTML($post->id); ?> </strong>
				</p>

				<p><?= $post->description;?></p>


				<p id="description">
				<?php if($post->phone1){?>
					<a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>" class="m-right-20"><i class="fa fa-lg fa-phone"></i>&nbsp;
						Call Us</a> 
						<?php }?>
						<?php if($post->website){?>
						<a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>" class="m-right-20"><i
						class="fa fa-lg fa-globe"></i>&nbsp; Website</a> 
						<?php }?>
						<?php if($post->email){?>
						<a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>"
						class="m-right-20"><i class="fa fa-lg fa-envelope"></i>&nbsp;
						Email</a>
						<?php }?>
				</p>
			</div>

			<div class="col-lg-1 text-right ">
			<?php if($video){?>
				<a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>" title="Video"><i
					class="fa fa-lg pull-right fa-border fa-film text-emboss m-bot-35"></i>
				</a> 
				<?php }?>
				<?php if($photo){?>
				<a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>" title="Photo"> <i
					class="fa fa-lg pull-right fa-border fa-camera text-emboss m-bot-35"></i>
				</a>
				<?php }?>
			</div>
		</div>
	</div>
	<?php endforeach;?>



</div>
<!-- END OF LISTING -->
<?php }?>

<ul class="pagination pull-right">
  <li><?php  echo $this->pagination->create_links(); ?></li>
  
</ul>








